package com.example.tests;

import static org.hamcrest.Matchers.equalTo;
import static org.junit.Assert.assertThat;

public class GroupTestBase extends TestBase {

	public GroupTestBase() {
		super();
	}

	protected void modelCheck() {
		if(wantCheck()){
			if("yes".equals(app.getProperty("ceck.db"))){
				assertThat(app.getModel().getGroups(), 
						equalTo(app.getHibernateHelper().listGroups()));
			}
			
			if("yes".equals(app.getProperty("ceck.ui"))){
				assertThat(app.getModel().getGroups(), 
						equalTo(app.getGroupHelper().getUIGroups()));
			}
		}
	}

}